<!DOCTYPE>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>参数</title>

    <script src="js/traceur.js"></script>
    <script src="js/bootstrap.js"></script>
    <script>
        function myFunction(x, y, z) {
            x = x === undefined ? 1 : x;
            y = y === undefined ? 2 : y;
            z = z === undefined ? 3 : z;

            console.log(x, y, z); // 1 2 3
        }
        myFunction(6, 7);
    </script>

    <script type="module">
        function myFunction(x = 1, y = 2, z = 3) {
            console.log(x, y, z);
        }
        myFunction( 6, 9);
    </script>
</head>
</html>